import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/components/Login";
import Manager from "@/components/Manager";
import AddCategory from "@/components/food/AddCategory";
import CategoryList from "@/components/food/CategoryList";
import FoodList from "@/components/food/FoodList";
import AddFood from "@/components/food/AddFood";
import MachineList from "@/components/machine/MachineList";
import AddMachine from "@/components/machine/AddMachine";
import OrderList from "@/components/order/OrderList";
import MyCart from "@/components/cart/MyCart";
import MyOrder from "@/components/cart/OrderList";
import MemberList from "@/components/member/MemberList";
import AddMember from "@/components/member/AddMember";
import UptimeList from "@/components/member/UptimeList";
import AddUptime from "@/components/member/AddUptime";
import OrderItemList from "@/components/order/OrderItemList";
import Chongzhi from "@/components/member/Chongzhi";
import UpdatePwd from "@/components/member/UpdatePwd";
import Userinfo from "@/components/member/Userinfo";
Vue.use(Router)

export default new Router({
  routes: [
    {path: "/", component: Login},
    {
      path: "/manager", component: Manager,
      children:[
        {path: "/food/AddCategory", component: AddCategory},
        {path: "/food/AddFood", component: AddFood},
        {path: "/food/CategoryList", component: CategoryList},
        {path: "/food/FoodList", component: FoodList},
        {path: "/machine/MachineList", component: MachineList},
        {path: "/machine/AddMachine", component: AddMachine},
        {path: "/cart/MyCart", component: MyCart},
        {path: "/cart/MyOrder", component: MyOrder},
        {path: "/order/OrderList", component: OrderList},
        {path: "/member/MemberList", component: MemberList},
        {path: "/member/AddMember", component: AddMember},
        {path: "/member/UptimeList", component: UptimeList},
        {path: "/member/AddUptime", component: AddUptime},
        {path:"/order/OrderItemList",component:OrderItemList},
        {path:"/member/UpdatePwd",component:UpdatePwd},
        {path:"/member/Chongzhi",component:Chongzhi},
        {path:"/member/Userinfo",component:Userinfo},
      ]
    }
  ]
})
